#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f;

void solve()
{
	int a, b;
	cin >> a >> b;
	cout << 3 << endl;
	int sum = a * 3;
	sum -= b;
	if (sum - b - 1 < b) cout << sum - b - 1 << ' ' << b << ' ' << b + 1;
	else cout << b - 1 << ' ' << b << ' ' << sum - b + 1;
}

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int _ = 1;
	//cin >> _;
	while (_--)
	{
		solve();
	}
	return 0;
}